from django.urls import re_path
from rest_framework.routers import DefaultRouter
from . import views

urlpatterns = [
    re_path(r'^labels/$', views.LabelAPIView.as_view()),
    re_path(r'^upload/avatar/$', views.PublicImgView.as_view()),
]

router = DefaultRouter()

router.register(r'articles/search', views.SearchAtticleGenericViewSet, basename='search')

urlpatterns += router.urls

router.register(r'channels', views.ChannelModelViewSet, basename='channels')

urlpatterns += router.urls

router.register(r'article', views.ArticleModelViewSet, basename='article')

urlpatterns += router.urls
